<template>
  <!--意见反馈 -->
  <view class="header">
    <u-toast ref="uToast" />
    <view class="textbox">
      <u-input v-model="value" class="bjcolor" :type="type" maxlength="200" :border="border" :height="height"
        :auto-height="autoHeight" />
      <view class="number">
        {{value.length}}/200
      </view>
    </view>
    <view class="bosds">
      <view class="sdfsdf" @click="AddComplaint()">
        提交
      </view>
    </view>
  </view>
</template>
<script>
  export default {
    data() {
      return {
        value: '',
        type: 'textarea',
        border: false,
        height: 430,
        autoHeight: true,
      }
    },
    methods: {
      async AddComplaint() {
        try {
          let data = {
            Content: this.value
          }
          const res = await this.$api.system.AddComplaint(data)
          this.$refs.uToast.show({
            title: '完成',
            type: 'success',
            isTab: true,
            url: '/pages/me/me'
          })
        } catch (e) {}
      },
    }
  }
</script>

<style lang="scss" scoped>
  page {
    background-color: #F6F6F6;
  }

  .header {
    padding: 27rpx 24rpx;
  }

  .textbox {
    height: 500rpx;
    background: #FFFFFF;
    box-shadow: 0px 0px 10rpx 0px rgba(0, 0, 0, 0.1);
    border-radius: 10rpx;
    padding: 20rpx;
  }

  .bjcolor {
    background: #FFFFFF;
  }

  .number {
    background: #FFFFFF;
    margin-left: 540rpx;
    font-size: 30rpx;
    color: #999999;
    text-align: right;
  }

  .bosds {
    margin-top: 190rpx;

    .sdfsdf {
      width: 702rpx;
      height: 88rpx;
      background: linear-gradient(0deg, #FBD220, #FFE23E);
      border-radius: 44rpx;
      font-size: 32rpx;
      color: #333333;
      line-height: 88rpx;
      text-align: center;
    }
  }
</style>
